<template>
<div id="oneMapLocation">
    <!-- <div class="title">
        <span @click="onClickLeft" style="position: absolute;left: 5px;display: flex;align-items: center;font-size: 14px;">
            <van-icon name="arrow-left" />
            返回
        </span>
        电子地图
    </div> -->
    <div style="width: 100%; height: calc(100vh - 50px);">
        <iframe style="width: 100%; height: 100%;" :src="mapUrl"></iframe>
    </div>
</div>
</template>

<script>
export default {
    data() {
        return {
            mapUrl: window.g.oneMapUrlLocation
        }

    },
    methods: {
        onClickLeft() {
            this.$router.back(-1)
        },
    },
    mounted() {
        var vdata= JSON.parse(this.$route.query.data) 
        vdata.JDID = vdata.NODE_GUID 
        vdata.SQBH = vdata.ROW_GUID 
        vdata.FWBH = vdata.FAMILYHOUSEID 
        vdata.APPLICANT = vdata.HOUSEAPPLICANT
        vdata.ADDESS = null
        
        this.mapUrl = `${window.g.oneMapUrlLocation}?type=edit&jieduan=takan&data=[${JSON.stringify(vdata)}]`
        if(ZWJSBridge) {
            ZWJSBridge.setTitle({
                "title": "电子地图"
            }).then(res => {
            }).catch(err => {
            })
        }
    },
}
</script>

<style lang="scss" scoped>
#oneMapLocation {
    height: 100vh;
    overflow: auto;
    background: #ffffff;
    font-size: 14px;

    .title {
        width: 100%;
        height: 50px;
        background: #007aff;
        line-height: 50px;
        text-align: center;
        color: #ffffff;
        font-size: 20px;
        position: relative;
    }
}
</style>
